package oop.java0321;

import java.util.Scanner;

public class CalcTest {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Calc calc = new Calc();
        calc.brand = "卡西欧";
        calc.price = 199;
        calc.color = "五彩斑斓的黑";
        calc.showInfo();
        System.out.print("请输入两个整数：");
        int a = in.nextInt();
        int b = in.nextInt();
        System.out.println(a + "+" + b + "=" + calc.add(a, b));
        System.out.println(b + "-" + a + "=" + calc.sub(a, b));
        System.out.println(a + "×" + b + "=" + calc.mul(a, b));
        System.out.println(b + "÷" + a + "=" + calc.div(a, b));
        System.out.println(a + "的三次方" + "=" + calc.cube(a));
        System.out.print("请输入两个浮点数：");
        double c = in.nextDouble();
        double d = in.nextDouble();
        System.out.println(c + "+" + d + "=" + calc.add(c, d));
        System.out.println(d + "-" + c + "=" + calc.sub(c, d));
        System.out.println(c + "×" + d + "=" + calc.mul(c, d));
        System.out.println(d + "÷" + c + "=" + calc.div(c, d));
        System.out.println(c + "的三次方" + "=" + calc.cube(c));
    }
}
